
#include <stdio.h>
#include <stdlib.h>
#include "object.h"
#include "objectsystem.h"
#include "palette.h"
#include "zone.h"
using namespace std;

extern zone currentZone;
extern layerpalette backgroundpal;
extern layerpalette foregroundpal;
int main(int argc, char**argv)
{
    pcPalettes();
	pcObjects();
	pcLevels();


    //object* player = object[0];
    byte level=0;

    LevelDataLoad(level);
    printf("current layout location: %i\n", currentZone.v_lvllayout);
    for (int y = 0; y < 4; y++)
    {
        printf("\n");
        for (int x=0; x < 80; x++)
            printf("%02X ", currentZone.v_lvllayout[y*80+x]);
    }
    for (int line = 0; line < 4; line++)
    {
       printf("palette line %i: ", line);
       for (int col = 0; col < 16; col++) 
       {
           printf("%02X ", foregroundpal.line[line].color[col]);
       }
       printf("\n");
    }

    
	
	for (int a=0; a<10; a++)
	{
           
	    //OPL_Main(0);
	    //v_opl_routine=2;
     }

	
	system("PAUSE");
}
	
